home *** CD-ROM | disk | FTP | other *** search
- /*
- File: TextEditorInit.cpp
-
- Contains: CFM library init routine for TextEditor
-
- Written by: Steve Smith
-
- Copyright: © 1994 - 1995 by Apple Computer, Inc., all rights reserved.
-
- */
-
-
- #ifndef _COMPILERDEFS_
- #include "CompDefs.h"
- #endif
-
- // -- OpenDoc Utilities --
-
- #ifndef _EXCEPT_
- // Exceptions define several important macros (e.g. CHECKENV)
- // which are used in the SOM method dispatch glue. If Except.h
- // is not included early enough, exceptions may not be thrown
- // correctly when returning from a SOM method with "ev" parameter set.
- #include <Except.h>
- #endif
-
- // -- Macintosh Headers --
-
- #ifndef __CODEFRAGMENTS__
- #include <CodeFragments.h>
- #endif
-
- #ifndef _ODMEMORY_
- #include <ODMemory.h>
- #endif
-
- #ifndef _USERSRCM_
- #include <UseRsrcM.h>
- #endif
-
- #pragma segment TextEditorInit
-
- //------------------------------------------------------------------
- // Prototypes
- //------------------------------------------------------------------
-
- extern "C" pascal OSErr TextEditorCFMInit(CFragInitBlockPtr initBlkPtr);
-
-
- //------------------------------------------------------------------
- // Functions
- //------------------------------------------------------------------
-
- extern "C" pascal OSErr TextEditorCFMInit(CFragInitBlockPtr initBlkPtr)
- {
- // We are using OpenDoc's memory management calls, so we
- // must initialize the interface to the memory manager.
- OSErr err1 = InitODMemory();
- // We must also capture the relevant information about
- // our library file so that we may access our resources.
- OSErr err2 = InitLibraryResources(initBlkPtr);
-
- return (OSErr) (err1 != noErr) ? err1 : err2;
- }
-
-
-
-